﻿using Microsoft.AspNetCore.Http;

namespace WT.OpenIddict.Domain.Services.Exceptions;

public class UserFriendlyException : UnifiedException
{
    public UserFriendlyException(
        IDictionary<string, string[]> errors,
        string message = "用户友好异常")
        : base(message, StatusCodes.Status400BadRequest, "user_error")
    {
        Extensions.Add("errors", errors);
    }

    public UserFriendlyException(
        string details,
        string message = "用户友好异常")
        : base(message, StatusCodes.Status400BadRequest, "user_error")
    {
        Extensions.Add("errors", details);
    }
}